home *** CD-ROM | disk | FTP | other *** search
/ Armageddon - Interactive Preview / Interactive Preview: Armageddon.iso / pc / control.dxr / Scripts & Behaviors_32_aScrollerObj.ls < prev    next >
Encoding:
Text File  |  1998-05-19  |  1.1 KB  |  44 lines

  1. property pTickBkgd, pTopScroll, pBottomScroll, pCenterMain, pThisName, pEndScroll
  2.  
  3. on new me, tickBkgd, topScroll, bottomScroll, centerMain
  4.   set pTickBkgd to tickBkgd
  5.   set pTopScroll to topScroll
  6.   set pBottomScroll to bottomScroll
  7.   set pCenterMain to centerMain
  8.   hideAll(me)
  9.   return me
  10. end
  11.  
  12. on hideAll me
  13.   repeat with x = pTickBkgd to pBottomScroll
  14.     set the visible of sprite x to 0
  15.   end repeat
  16.   updateStage()
  17. end
  18.  
  19. on showAll me, endScroll
  20.   set pEndScroll to endScroll
  21.   repeat with x = pTickBkgd to pBottomScroll
  22.     set the visible of sprite x to 1
  23.   end repeat
  24.   updateStage()
  25. end
  26.  
  27. on scrollUp me
  28.   set thisMember to the member of sprite pCenterMain
  29.   set pThisName to the name of member thisMember
  30.   if the scrollTop of member pThisName > 0 then
  31.     set the scrollTop of member pThisName to the scrollTop of member pThisName - 4
  32.     updateStage()
  33.   end if
  34. end
  35.  
  36. on scrollDown me
  37.   set thisMember to the member of sprite pCenterMain
  38.   set pThisName to the name of member thisMember
  39.   if the scrollTop of member pThisName < pEndScroll then
  40.     set the scrollTop of member pThisName to the scrollTop of member pThisName + 4
  41.     updateStage()
  42.   end if
  43. end
  44.